Skip to main content

CreateScalingConfiguration

Description

call CreateScalingConfiguration to create a scaling configuration.

Request Method

POST

Request Path

/apsara/route/Ess/CreateScalingConfiguration

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
KeyPairNameBODYstringNoNo sample value for this parameter.key pair name. Windows ECS instances to ignore this parameter. The default is empty. Even if the KeyPairName is filled in, only the Password will be executed. The password login method of the Linux ECS instance will be initialized to be disabled.
ScalingConfigurationNameBODYstringNoNo sample value for this parameter.The display name of the scaling configuration, which is 2 to 40 English or Chinese characters, and can contain a number, an underscore (_), a connection number (-), and a period (.). The same user account is unique in the same region and the same scaling group. if this parameter is not specified, the default value is the ScalingConfigurationId value.
LoadBalancerWeightBODYintegerNoNo sample value for this parameter.the weight of the backend server. the value range is 0~100, and the default value is 50.
IoOptimizedBODYstringNoNo sample value for this parameter.is it an I/O optimized instance. Value range: optimized:I/O optimization. When this parameter is not passed: Specifications InstanceType to series I default to non-I/O optimization. InstanceType non-series I specifications are I/O optimized by default. This parameter cannot be passed in only instance specifications that are not I/O optimized.
UserDataBODYstringNoNo sample value for this parameter.Instance custom data needs to be encoded in Base64. The original data is up to 16KiB.
ScalingGroupIdBODYstringYesNo sample value for this parameter.the ID of the scaling group to which the scaling configuration belongs.
DataDisk.N.CategoryBODYstringNoNo sample value for this parameter.the disk type of data disk n. Value range: cloud: ordinary cloud disk cloud_efficiency: efficient cloud disk cloud_ssd:SSD cloud disk ephemeral_ssd: local SSD default value: cloud.
DataDisk.n.DeleteWithInstanceBODYstringNoNo sample value for this parameter.indicates whether the data disk is released with the instance. Value range: true: when the instance is released, the disk is released with the instance. false: when the instance is released, the disk is reserved and not released. default value: true. This parameter is only valid for independent cloud disks (DataDisk.n.Category is cloud, cloud_efficiency, or cloud_ssd), otherwise an error will be reported.
SecurityGroupIdBODYstringYesNo sample value for this parameter.specifies the ID of the security group to which the newly created instance belongs. instances in the same security group can access each other.
DataDisk.N.SizeBODYintegerNoNo sample value for this parameter.the disk size of data disk n, the value of n ranges from 1 to 4, and the unit is GiB. Value range: cloud:5~2000 cloud_efficiency:20~32768 cloud_ssd:20~32768 ephemeral_ssd:5~800 after this parameter is specified, it must be greater than or equal to the snapshot size of the specified SnapshotId.
versionBODYstringNo2016-01-01version of api
SystemDisk.SizeBODYintegerNoNo sample value for this parameter.system disk size, unit: GiB. Value range: cloud:40~500 cloud_efficiency:40~500 cloud_ssd:40~500 ephemeral_ssd:40~500 default value: max{40,ImageSize}. After specifying this parameter, it must be greater than or equal to max{40, ImageSize}.
InstanceNameBODYstringNoNo sample value for this parameter.the name of the instance created based on the current scaling configuration.
DataDisk.N.SnapshotIdBODYstringNoNo sample value for this parameter.the snapshot used to create a data disk. the value of n ranges from 1 to 4. After specifying this parameter, the DataDisk.N.Size will be ignored. the actual disk size is the size of the specified snapshot. If the snapshot was created before July 15, 2013 (inclusive), the call will be rejected, and a maximum of 4 InvalidSnapshot.TooOld returned in the Response can be entered.
RamRoleNameBODYstringNoNo sample value for this parameter.instance RAM role name. The name is provided and maintained by RAM and queried by ListRoles. For more information, see related API CreateRole and ListRoles.
InternetMaxBandwidthInBODYintegerNoNo sample value for this parameter.the maximum public network inbound bandwidth, the unit is Mbit/s(Mega bit per second), and the value range is 1~200. If this parameter is not specified, it is automatically set to 200 Mbit/s.
DataDisk.N.DeviceBODYstringNoNo sample value for this parameter.data disk mount point. the value of n ranges from 1 to 4. Blank indicates that the ECS instance is automatically created by default, starting from/dev/xvdb to/dev/xvdz. Default value: blank.
regionIdBODYstringYesNo sample value for this parameter.region id
ImageIdBODYstringYesNo sample value for this parameter.image file ID, which indicates the image resource selected when starting the instance.
InstanceTypes.NBODYstringNoNo sample value for this parameter.If the InstanceTypes.N multi-instance specification parameter is used, the InstanceType parameter will be ignored. in the InstanceTypes.N parameter, the value range of n is 1~10, that is, up to 10 instance specifications can be set in a scaling configuration. n in the InstanceTypes. n parameter represents the priority of the instance specification in the current scaling configuration. the instance specification with number 1 has the highest priority, and the instance specification priority decreases as the number increases. when an instance type with higher priority cannot be created due to some reasons, the instance type with the next priority will be automatically selected to create the instance.
SystemDisk.CategoryBODYstringNoNo sample value for this parameter.the disk type of the system disk. Value range: cloud: ordinary cloud disk cloud_efficiency: efficient cloud disk cloud_ssd:SSD cloud disk ephemeral_ssd: local SSD when the InstanceType is the specification of series I and the I/O optimization type is none, the default value is cloud. Otherwise, default value: cloud_efficiency.
InstanceTypeBODYstringYesNo sample value for this parameter.the resource specification of the ECS instance.
TagsBODYstringNoNo sample value for this parameter.instance tag. The label is passed in as a key-value pair in the following format: {"key1": "value1", "key2": "value2",... "key5": "value5"}. Up to 5 groups of labels. key: supports up to 64 characters. aliyun is not supported. does not support the beginning of http:// and https. is not allowed to be an empty string. value: supports up to 128 characters. aliyun is not supported. does not support the beginning of http:// and https. is allowed to be an empty string.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}